package edu.washington.tcss360.burningpenguins.tests;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;

import edu.washington.tcss360.burningpenguins.data.DataObject;
import edu.washington.tcss360.burningpenguins.data.Permission;

/**
 * This class Tests PaperCategory.
 * @author Rolando Sierra
 *@version 11/17/2013
 */
public class PermissionTest 
{

	/** A permission object to use in tests */
	private DataObject my_permission;
	
	/** Sets up the data object for tests. */
	@Before
	public void setUp() throws Exception 
	{
		my_permission = new Permission();
	}

	/** Test setting and getting ID. */
	@Test
	public void testGetId() 
	{
		my_permission.setId(3);
		assertSame("Incorrect Id", my_permission.getId(), 3);
	}

	/** Test setting and getting ConferenceID. */
	@Test
	public void testGetConferenceId() 
	{
		((Permission) my_permission).setConferenceId(3);
		assertSame("Incorrect Id", ((Permission) my_permission).getConferenceId(), 3);
	}

	/** Test setting and getting UserID. */
	@Test
	public void testGetUserId() 
	{
		((Permission) my_permission).setUserId(3);
		assertSame("Incorrect Id", ((Permission) my_permission).getUserId(), 3);
	}

	/** Test setting and getting RoleID. */
	@Test
	public void testGetRoleId() 
	{
		((Permission) my_permission).setRoleId(3);
		assertSame("Incorrect Id", ((Permission) my_permission).getRoleId(), 3);
	}

}
